/*////////////////////////////////////////////////////////////////////////
*
*  Project:      mapgen
*  Description:  Map Generator for Planet Wars at http://ai-contest.com/.
*  Author:       Copyright (C) 2010 Alexander Makodzeba
*  License:      GPLv3
*
*  This file is part of mapgen.
*
*  mapgen is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  mapgen is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with mapgen.  If not, see <http://www.gnu.org/licenses/>.
*
////////////////////////////////////////////////////////////////////////*/

#ifndef __MAP_CREATOR_H__
#define __MAP_CREATOR_H__

#include "MapGeneratorParams.h"

struct PlanetData;

//////////////////////////////////////////////////////////////////////////
// map generator - creates maps
class MapGenerator
{
private:
	MapGeneratorParams _params;

public:
	MapGenerator(MapGeneratorParams params);
	~MapGenerator(void);

	void GenerateMaps(void);
	std::string GenerateSymmetricMap(int planetCount);
	std::string GenerateAsymmetricMap(int planetCount);

private:
	void CreateMapFile(std::string map, int i);
	PlanetData GeneratePlanet();
	PlanetData GenerateCenterPlanet();
	PlanetData GenerateSymmetricPlanet(const PlanetData& planet, int nPlayer);
	void PutPlayerOnPlanet(PlanetData& planet, int playerID);
};

#endif // __MAP_CREATOR_H__